OPC Studio User's Guide and Reference
Live Mapping Model for OPC Data (Classic and UA)
Client and Subscriber Development > Development Models > Live Mapping Model > Live Mapping Model for OPC Data (Classic and UA)

The live mapping development model allows you to write objects that correspond logically to a functionality provided by whatever is “behind” the OPC data. For example, if part of your application works with a boiler, it is natural for you to create a boiler object in the code. You then describe how your objects and their members correspond to OPC data – this is done using attributes to annotate your objects. Using Live Mapping methods, you then map your objects to OPC data, and perform OPC operations on them.

For example, when you subscribe to OPC items (in OPC Classic) or OPC attributes (in OPC-UA), incoming OPC notifications about changes can directly set corresponding properties in your objects, without any further coding. You can then focus on writing the code that handles these property changes, abstracting away the fact how they come in.

Note: Some mapping technologies for.NET already exist, from Microsoft or otherwise. These technologies are mainly focused on mapping database information (ORM – Object-relational mapping), and they are not well suitable for automation purposes like OPC. We therefore had to implement a new mapping model. We use the term “live mapping” so that it is clearly distinguished from other mapping technologies used; it also reflects the fact that this kind of mapping is well-suited for real-time, “live” data.

Do not confuse the live mapping model with live binding, also provided by OPC Data Client. The main differences between the two are that

With live mapping model, you generally need to do following steps in order:

  1. Write classes that are a logical model of your application. If you are following object-oriented principles in your design, chances are that your code already has such classes anyway.
  2. Annotate the classes with attributes for live mapping. The main purpose of these attributes is to describe how the members of your classes correspond to nodes in the OPC address space. 
  3. Create instance(s) of your classes, as usually.
  4. Perform the actual mapping, which associates your objects with OPC data.
  5. Call mapping operations as needed, e.g. execute OPC reads, writes, or subscribe to changes in OPC values. 

 

The features discussed here, or some of them, may not be available in all editions of the product. Check the Product Editions page for differences between the editions. The trial license has all features enabled (and is limited in period for which it provides valid data), but licenses for specific commercial editions may have functionality limitations.

 

See Also

Installed Examples - Console